<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2019/5/14
 * Time: 20:15
 */

namespace app\admin\validate;


use think\Validate;

class Login extends Validate
{
    protected $rule = [
        'username'  =>'require|max:16|min:6',
        'password'  =>'require',
        '__token__' => 'require|token'
    ];

    protected $message = [
        'username.require' => '管理员账户必填',
        'password.require' => '密码必填',
        'username.max' => '管理员账户不能超过16个字符',
        'username.min' => '管理员账户不能少于6个字符',
        '__token__.token'    => '你已经提交过了',
    ];

    protected $scene = [
        'login'=>['username','password','__token__']
    ];


}